function *idGenerator(){
    let id = 123
    while(true){
        yield id
        id++
    }
}

const generator = idGenerator()
console.log(generator.next())
console.log(generator.next())
console.log(generator.next())
console.log(generator.next())
console.log(generator.next())